<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
    <head>
        <title>Throw your Post on the wall</title>
    </head>

    <body>
        <header></header>
        <c:set var="w" value="${wall}"/>

        <table>
        <tr><td><h3><c:out value="${w.wallTitle}"/></h3></td>
        <td><small>built by <c:out value="${w.userName}"/> on <c:out value="${w.date}"/></small></td>
        </tr>
        </table>
        
        <table width="100%" cellpadding="1" cellspacing="1">
            
            <form name="postForm" method="post" action="./addpost">
                <tr>
                    <td width="50%"><input type="text" name="postMsg" size="80" maxlength="160"></td>
                    <td><input type="submit" name="postSubmit" style="width:15em" value="Post message"></td>
                    </tr>
                <input type="hidden" name="wallName" value="${w.wallName}">
                <input type="hidden" name="wallId" value="${w.wallId}">
            </form>
         </table>
         <table width="100%">
            <c:forEach var="p" items="${w.post}">
                <tr>
                    <td width="50%"><c:out value="${p.message}"/>
                    Posted by <a href="./user?u=${p.userName}"><c:out value="${p.userName}"/></a> on <c:out value="${p.date}"/></td>
                </tr>
            </c:forEach>
        </table>
        <footer></footer>
    </body>
</html>
